[Slack Alert] Facebook High Spend

This automation checks whether today’s spend of one of the campaigns exceeds a certain amount, which you define in the setup. If the campaign has spent more than the threshold, you will get a Slack notification with a link to the Ads Manager.

Get an alert on Slack every time your campaign/account reaches a minimum spend. You won't get a Slack message if none of your campaigns have higher spending.

Notion image

JSON Recipe

Import the automation recipe(s) into your own account. Don’t know how? Learn here.

High Spend: Slack Notifier [Campaign level]
{"name":"[Slack alert] Facebook High Spend - Campaign Level","description":"A blank recipe","nodes":{"start_1":{"type":"start","logging_enabled":false,"x":150,"y":50},"stop_1":{"type":"stop","logging_enabled":false,"x":1998,"y":525,"inputs":{"stop":{"export_enabled":true}}},"fb_fetch_insights_v6_1":{"type":"fb_fetch_insights_v6","logging_enabled":false,"x":370,"y":210,"inputs":{"action_report_time":{"export_enabled":true,"data":"conversion"},"breakdowns":{"export_enabled":true},"action_breakdowns":{"export_enabled":true},"fields":{"export_enabled":true,"data":["account_id","account_name","spend","impressions","campaign_id","campaign_name"]},"use_unified_attribution_setting":{"export_enabled":true,"data":true},"level":{"export_enabled":true,"data":"campaign"},"action_attribution_windows":{"export_enabled":true,"data":["default"]},"time_increment":{"export_enabled":true,"data":"all_days"},"date_range":{"export_enabled":true,"data":"today"}}},"fb_select_ad_account_ids_v2_1":{"type":"fb_select_ad_account_ids_v2","logging_enabled":false,"x":52,"y":202,"inputs":{"ad_account_ids":{"export_enabled":true}}},"slack_select_conversation_id_1":{"type":"slack_select_conversation_id","logging_enabled":false,"x":1305,"y":31,"inputs":{"conversation_id":{"export_enabled":true}}},"delay_1":{"type":"delay","logging_enabled":false,"x":59,"y":661,"inputs":{"duration":{"export_enabled":true,"data":3600}}},"patch_json_v2_1":{"type":"patch_json_v2","logging_enabled":false,"x":685,"y":203,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/filter","value":"{{input.value/0}}"}]}}},"filter_v2_1":{"type":"filter_v2","logging_enabled":false,"x":769,"y":278,"group":"group_2"},"build_filter_1":{"type":"build_filter_v2","logging_enabled":false,"x":452,"y":110,"group":"group_2","inputs":{"filters":{"export_enabled":true,"data":[{"value":100,"pointer":"/spend","operator":"\u003e"}]},"schema":{"export_enabled":true,"data":"fb_insight"}}},"slack_notifier_v2_1":{"type":"slack_notifier_v2","logging_enabled":false,"x":1159,"y":204,"group":"group_1"},"patch_json_v2_2":{"type":"patch_json_v2","logging_enabled":false,"x":922,"y":204,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/0/text/text","value":"The campaign {{input.value/campaign_name}} has spent {{input.value/spend}}. You get this notification because spend exceeds {{input.value/filter/value}}.  "},{"op":"replace","path":"/1/elements/0/url","value":"https://business.facebook.com/adsmanager/manage/ads?act={{input.value/account-id}}\u0026filter_set=SEARCH_BY_CAMPAIGN_GROUP_IDS-STRING_SET%1EANY%1E[%{{input.value/campaign_id}}%22]"}]},"data":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":""}},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","text":"Open in Ads Manager"},"url":""}]}]}}},"for_each_v2_1":{"type":"for_each_v2","logging_enabled":false,"x":451,"y":200,"group":"group_1"},"if_v2_1":{"type":"if_v2","logging_enabled":false,"x":868,"y":208,"inputs":{"b":{"export_enabled":true,"data":[]},"condition":{"export_enabled":true,"data":"not_equal"}}},"slack_notifier_v2_2":{"type":"slack_notifier_v2","logging_enabled":false,"x":206,"y":206,"group":"group_1","inputs":{"thread_ts":{"export_enabled":true}}}},"edges":["build_filter_1.filters:patch_json_v2_1.value","patch_json_v2_1.data:patch_json_v2_2.value","fb_select_ad_account_ids_v2_1.ad_account_ids:fb_fetch_insights_v6_1.ad_account_ids","slack_select_conversation_id_1.conversation_id:slack_notifier_v2_1.conversation_id","start_1.start:fb_fetch_insights_v6_1.fetch","fb_fetch_insights_v6_1.insights:filter_v2_1.items","build_filter_1.filters:filter_v2_1.filters","patch_json_v2_2.data:slack_notifier_v2_1.blocks","patch_json_v2_2.patched:slack_notifier_v2_1.send","slack_notifier_v2_1.sent:for_each_v2_1.next","delay_1.delayed:fb_fetch_insights_v6_1.fetch","slack_select_conversation_id_1.conversation_id:slack_notifier_v2_2.conversation_id","slack_notifier_v2_2.sent:for_each_v2_1.start","slack_notifier_v2_2.thread_ts:slack_notifier_v2_1.thread_ts","for_each_v2_1.done:delay_1.start","filter_v2_1.items:if_v2_1.a","if_v2_1.true:slack_notifier_v2_2.send","for_each_v2_1.do:patch_json_v2_1.patch","patch_json_v2_1.patched:patch_json_v2_2.patch","fb_fetch_insights_v6_1.fetched:filter_v2_1.filter","filter_v2_1.filtered:if_v2_1.evaluate","if_v2_1.false:delay_1.start","filter_v2_1.items:for_each_v2_1.items","for_each_v2_1.item:patch_json_v2_1.data"],"groups":{"group_2":{"title":"Filter","description":"","x":624,"y":215,"inputs":["filter_v2_1.filter","filter_v2_1.items"],"outputs":["filter_v2_1.items","filter_v2_1.filtered","build_filter_1.filters"]},"group_1":{"title":"Send Slack Message","description":"","x":1107,"y":210,"inputs":["patch_json_v2_1.value","slack_notifier_v2_1.conversation_id","slack_notifier_v2_2.conversation_id","slack_notifier_v2_2.send","for_each_v2_1.items"],"outputs":["for_each_v2_1.done"]}},"widgets":{"widget_1":{"title":"Filters","description":"Filter Facebook insights based on your criteria","position":3,"icon":"las la-filter","input":"build_filter_1.filters"},"widget_2":{"title":"Ad Account","description":"Select one or more Facebook Accounts","position":0,"input":"fb_select_ad_account_ids_v2_1.ad_account_ids"},"widget_3":{"title":"Slack Channel","description":"Select a Slack Channel","position":1,"input":"slack_select_conversation_id_1.conversation_id"},"widget_4":{"title":"Run Every","description":"The duration to delay the trigger (in Seconds)","position":2,"input":"delay_1.duration"}},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}
High Spend: Slack Notifier [Account level]
{"name":" [Slack alert] Facebook High Spend - Account Level","description":"A blank recipe","nodes":{"start_1":{"type":"start","logging_enabled":false,"x":150,"y":50},"stop_1":{"type":"stop","logging_enabled":false,"x":1998,"y":525,"inputs":{"stop":{"export_enabled":true}}},"fb_fetch_insights_v6_1":{"type":"fb_fetch_insights_v6","logging_enabled":false,"x":517,"y":254,"inputs":{"action_report_time":{"export_enabled":true,"data":"conversion"},"breakdowns":{"export_enabled":true},"action_breakdowns":{"export_enabled":true},"fields":{"export_enabled":true,"data":["account_id","account_name","spend"]},"use_unified_attribution_setting":{"export_enabled":true,"data":true},"level":{"export_enabled":true,"data":"account"},"action_attribution_windows":{"export_enabled":true,"data":["default"]},"time_increment":{"export_enabled":true,"data":"all_days"},"date_range":{"export_enabled":true,"data":"today"}}},"patch_json_v2_1":{"type":"patch_json_v2","logging_enabled":false,"x":840,"y":232,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/0/text/text","value":"Your Facebook account has spent {{input.value/spend}}. You get this notification because spend exceeds {{input.value/0/filter_value}}.  "},{"op":"replace","path":"/1/elements/0/url","value":"https://business.facebook.com/adsmanager/manage/ads?act={{input.value/0/account_id}}"}]},"data":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":""}},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","text":"Open in Ads Manager"},"url":""}]}]}}},"fb_select_ad_account_ids_v2_1":{"type":"fb_select_ad_account_ids_v2","logging_enabled":false,"x":52,"y":202,"inputs":{"ad_account_ids":{"export_enabled":true}}},"filter_v2_1":{"type":"filter_v2","logging_enabled":false,"x":797,"y":253},"slack_notifier_v2_1":{"type":"slack_notifier_v2","logging_enabled":false,"x":1376,"y":234,"group":"group_1","inputs":{"thread_ts":{"export_enabled":true}}},"slack_select_conversation_id_1":{"type":"slack_select_conversation_id","logging_enabled":false,"x":1103,"y":38,"group":"group_1","inputs":{"conversation_id":{"export_enabled":true}}},"build_filter_1":{"type":"build_filter_v2","logging_enabled":false,"x":799,"y":3,"inputs":{"filters":{"export_enabled":true,"data":[{"value":10000,"pointer":"/spend","operator":"\u003e"}]},"schema":{"export_enabled":true,"data":"fb_insight"}}},"delay_1":{"type":"delay","logging_enabled":false,"x":104,"y":561,"inputs":{"duration":{"export_enabled":true,"data":3600}}},"patch_json_list_v2_1":{"type":"patch_json_list_v2","logging_enabled":false,"x":1095,"y":250,"inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/filter_value","value":"{{input.value/0/value}}"}]},"value":{"export_enabled":true}}},"if_v2_1":{"type":"if_v2","logging_enabled":false,"x":1397,"y":208,"inputs":{"b":{"export_enabled":true,"data":[]},"condition":{"export_enabled":true,"data":"not_equal"}}}},"edges":["fb_select_ad_account_ids_v2_1.ad_account_ids:fb_fetch_insights_v6_1.ad_account_ids","slack_select_conversation_id_1.conversation_id:slack_notifier_v2_1.conversation_id","start_1.start:fb_fetch_insights_v6_1.fetch","fb_fetch_insights_v6_1.insights:filter_v2_1.items","build_filter_1.filters:filter_v2_1.filters","fb_fetch_insights_v6_1.fetched:filter_v2_1.filter","patch_json_v2_1.data:slack_notifier_v2_1.blocks","patch_json_v2_1.patched:slack_notifier_v2_1.send","delay_1.delayed:fb_fetch_insights_v6_1.fetch","filter_v2_1.items:patch_json_list_v2_1.data_list","slack_notifier_v2_1.sent:delay_1.start","filter_v2_1.filtered:patch_json_list_v2_1.patch","patch_json_list_v2_1.data_list:if_v2_1.a","patch_json_list_v2_1.patched:if_v2_1.evaluate","if_v2_1.true:patch_json_v2_1.patch","patch_json_list_v2_1.data_list:patch_json_v2_1.value","if_v2_1.false:delay_1.start"],"groups":{"group_1":{"title":"Send Slack Notification","description":"","x":1670,"y":245,"inputs":["patch_json_v2_1.value","patch_json_v2_1.patch"],"outputs":["slack_notifier_v2_1.sent"]}},"widgets":{"widget_1":{"title":"Filters","description":"Filter Facebook insights based on your criteria","position":3,"icon":"las la-filter","input":"build_filter_1.filters"},"widget_2":{"title":"Slack Cahnnel","description":"Select a Slack Channel","position":1,"input":"slack_select_conversation_id_1.conversation_id"},"widget_3":{"title":"Ad Account","description":"Select one or more Facebook Accounts","position":0,"input":"fb_select_ad_account_ids_v2_1.ad_account_ids"},"widget_4":{"title":"Run every","description":"The duration to delay the trigger (in Seconds)","position":0,"input":"delay_1.duration"}},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}

How To

Step 1

Select an Ad Account

Notion image

Step 2

Select a Slack Channel, in which you would like to receive the notifications

Notion image

Step 3

Define how often you want the automation to run

Notion image

Step 4

Select a threshold for the daily spend

Notion image
  1. In the Filter section, click Edit.
  1. In the Value, enter the highest possible daily spend on a campaign level. if the amount is higher, you will get a Slack Notification.
 
⚠️
By default, all active campaigns in an account will be checked (to use it at the account level, select the second recipe above). If you want to learn how to build this automation from scratch, follow this tutorial. When you build automations from scratch you gain an understanding of the core parts, that will allow you to modify automation and tailor it to your specific needs.
 
Did this answer your question?
😞
😐
🤩

Last updated on July 25, 2023